<% component = metadata.transforms.coercer %>

<%= component_header(component) %>

## Config File

<%= component_config_example(component) %>

## Options

<%= options_table(component.options.to_h.values.sort) %>

## Examples

Given the following input event:

{% code-tabs %}
{% code-tabs-item title="log" %}
```json
{
  // ... existing fields
  "bytes_in": "5667",
  "bytes_out": "20574",
  "host": "5.86.210.12",
  "message": "GET /embrace/supply-chains/dynamic/vertical",
  "status": "201",
  "timestamp": "19/06/2019:17:20:49 -0400",
  "user_id": "zieme4647"
}
```
{% endcode-tabs-item %}
{% endcode-tabs %}

And the following configuration:

{% code-tabs %}
{% code-tabs-item title="vector.toml" %}
```toml
[transforms.<transform-id>]
  type = "coercer"

[transforms.<transform-id>.types]
  bytes_in = "int"
  bytes_out = "int"
  timestamp = "timestamp|%m/%d/%Y:%H:%M:%S %z"
  status = "int"
```
{% endcode-tabs-item %}
{% endcode-tabs %}

A [`log` event][docs.log_event] will be emitted with the following structure:

```javascript
{
  // ... existing fields
  "bytes_in": 5667,
  "bytes_out": 20574,
  "host": "5.86.210.12",
  "message": "GET /embrace/supply-chains/dynamic/vertical",
  "status": 201,
  "timestamp": <19/06/2019:17:20:49 -0400>,
  "user_id": "zieme4647"
}
```

## How It Works [[sort]]

<%= component_sections(component) %>

## Troubleshooting

<%= component_troubleshooting(component) %>

## Resources

<%= component_resources(component) %>